package com.bosssoft.trainee.nontax.util.mapper.dtoVo;

import com.bosssoft.trainee.nontax.entity.dto.PermissionDto;
import com.bosssoft.trainee.nontax.entity.vo.PermissionVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @Description: permission dto vo transform util class
 * @Author: Luo WenLong
 * @Date: 2022/6/25 9:00
 */
@Mapper(componentModel = "spring")
public interface PermissionDtoVo {
    /**
     * @Description: dto to vo
     * @param permissionDto permission
     * @return: com.bosssoft.trainee.nontax.entity.vo.PermissionVo
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:12
     */
    @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    PermissionVo dto2vo(PermissionDto permissionDto);

    /**
     * @Description: dto to vo
     * @param permissionDtos permission list
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.vo.PermissionVo>
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:13
     */
    List<PermissionVo> dto2vo(List<PermissionDto> permissionDtos);

    /**
     * @Description: vo tp dto
     * @param permissionVo permission
     * @return: com.bosssoft.trainee.nontax.entity.dto.PermissionDto
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:13
     */
    @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    PermissionDto vo2dto(PermissionVo permissionVo);

    /**
     * @Description: vo tp dto
     * @param permissionVos permission list
     * @return: java.util.List<com.bosssoft.trainee.nontax.entity.dto.PermissionDto>
     * @Author: Luo WenLong
     * @Date: 2022/6/25 9:13
     */
    List<PermissionDto> vo2dto(List<PermissionVo> permissionVos);
}
